<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        
    </style>
</head>
<body>
    
</body>
<script>
    // 如何检测数组，对象，函数，null

    // 万能检测法：
    console.log(Object.prototype.toString.call( {} ))
    console.log(Object.prototype.toString.call( [] ))
    console.log(Object.prototype.toString.call( function(){} ))
    console.log(Object.prototype.toString.call( null ))
    console.log(Object.prototype.toString.call( undefined ))
    console.log(Object.prototype.toString.call( false ))
    console.log(Object.prototype.toString.call( 123 ))
    console.log(Object.prototype.toString.call( "123" ))
    console.log(Object.prototype.toString.call( Symbol() ))
    console.log(Object.prototype.toString.call( new Date() ))
    console.log(Object.prototype.toString.call( new Set() ))
    console.log(Object.prototype.toString.call( new Map() ))


    // ==============


    // 定义一个变量
    const a = {
        _value: 0,
        toString:function(){
            return ++this._value;
        }
    }

    // 要求满足以下条件
    if( a == 1 && a == 2 && a == 3 ){
        console.log("hello world");
    }


    

</script>
</html>